package com.zxyankh.raft.dto;

import com.alibaba.fastjson.JSON;

/**
 * @author ankh
 * @since 31.10.2017
 */
public class RequestVote {
    private int term;
    private int candidateId;
    private int lastLogIndex;
    private int lastLogTerm;

    public int getTerm() {
        return term;
    }

    public void setTerm(int term) {
        this.term = term;
    }

    public int getCandidateId() {
        return candidateId;
    }

    public void setCandidateId(int candidateId) {
        this.candidateId = candidateId;
    }

    public int getLastLogIndex() {
        return lastLogIndex;
    }

    public void setLastLogIndex(int lastLogIndex) {
        this.lastLogIndex = lastLogIndex;
    }

    public int getLastLogTerm() {
        return lastLogTerm;
    }

    public void setLastLogTerm(int lastLogTerm) {
        this.lastLogTerm = lastLogTerm;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
